package com.mowanka.mokeng.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.mowanka.mokeng.R
import com.mowanka.mokeng.data.model.bean.MKLabel

class LabelAdapter(data: MutableList<MKLabel>) :
    BaseQuickAdapter<MKLabel, BaseViewHolder>(R.layout.widget_layout_text_tag1, data) {
    override fun convert(helper: BaseViewHolder, item: MKLabel) {
        helper.setText(R.id.tv_tag, item.label)
            .setTextColor(R.id.tv_tag, item.textColor)
            .setBackgroundResource(R.id.tv_tag, item.res)
    }
}